<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../_frag/include.inc.jsp"%>
<div class="pageContent">
    <form method="post" action="${pageContext.request.contextPath}/admin/advertisement/save?navTabId=userLiNav&callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
        <input type="hidden" name="id" value="${advertisement.id}"/>
        <div class="pageFormContent" layoutH="57">
            <p>
                <label>标题: </label>
                <input type="text" name="title" value="${advertisement.title}" class="required" minlength="1" maxlength="100"/>
            </p>
            <p>
                <label>广告链接地址: </label>
                <input type="text" name="linkUrl" value="${advertisement.linkUrl}" class="required" minlength="1" maxlength="100"/>
            </p>
            <p>
                <label>图片地址: </label>
                <input type="text" name="imgUrl" value="${advertisement.imgUrl}" class="required url" maxlength="200"/>
            </p>
            <p>
                <label>排序: </label>
                <input type="text" name="sort" value="${advertisement.sort}" class="required integer" maxlength="10"/>
            </p>
            <p>
                <label>状态: </label>
                <select name="status">
                    <option value="0" <c:if test="${advertisement.status == 0}">selected</c:if>>下架</option>
                    <option value="1" <c:if test="${advertisement.status == 1}">selected</c:if>>上架</option>
                </select>
            </p>

            <p>
                <label>图片连接: </label>
                <input type="text" name="imgLink" class="required url" value=" ${advertisement.imgLink }" maxlength="200"/>
            </p>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
            </ul>
        </div>
    </form>
</div>